SET BAT_PATH=%~dp0
SET LOC_PATH=locale\zh_TW\LC_MESSAGES\django.po

cd /d %BAT_PATH%

:: copy to inside
XCOPY %BAT_PATH%event_django.po %BAT_PATH%src\events\%LOC_PATH%  /K /Y /I
XCOPY %BAT_PATH%users_django.po %BAT_PATH%src\users\%LOC_PATH%  /K /Y /I
XCOPY %BAT_PATH%templ_django.po %BAT_PATH%src\templates\5krun\%LOC_PATH%  /K /Y /I

:: events
cd /d %BAT_PATH%
cd /d src\\events
START /W django-admin.py compilemessages

:: users
cd /d %BAT_PATH%
cd /d src\\users
START /W django-admin.py compilemessages

:: templates
cd /d %BAT_PATH%
cd /d src\\templates\\5krun
START /W django-admin.py compilemessages

pause